In the case where analog data are inputted to a programmable logic controller (PLC), the PLC is configured to incorporate a conversion device (hereinafter referred to as A/D conversion device) therein, the conversion device converting an analog value into a digital value. An analog value inputted to the A/D conversion device contains various noise components according to the environment in which the PLC is installed. Particularly, an A/D conversion period of the A/D conversion device has been shortened in recent years, and noises that could not be sensed by a conventional A/D conversion device have been inputted thereto. The A/D conversion device includes an averaging processing function and a digital filter function as a function for attenuating noises. For a digital filter included in the A/D conversion device, a first-order lag filter, a low-pass filter, etc. may be used. The A/D conversion device is configured for a user to be able to use any of these filters according to application. The A/D conversion device can separate the frequency band of a signal desired by a user and the frequency band of a noise component and attenuate the noise component.
However, according to an A/D conversion device incorporated in a conventional PLC, when a desired filter characteristic cannot be obtained, a user has to perform a filter computation using a user program. Such execution of the filter computation using a user program may cause man-hours for creating a program to be increased and the CPU scan time to be increased.
In various production apparatuses having their PLCs installed therein, a single device is usually set to be able to produce a number of products. In such a case, when a product to be produced is changed, a program in the PLC is changed by pressing an external switch or a screen of a programmable display so as to change parameters to activated at a time. At this time, it is necessary to have means for easily changing parameters in an A/D conversion device in response to a request from the program in the PLC or a request of the programmable display.
In this connection, for example, Patent Literature 1 discloses a technique of storing previous input data in a ring buffer and two sets of coefficient data required for a digital filter process in a memory in advance. According to this technique, a termination determining process for a ring buffer process is not needed, and as a result the computation can be speeded up.
In addition, for example, Patent Literature 2 discloses a device that can calculate coefficient data according to a filter characteristic that has been inputted from outside.